﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;

namespace CarLoanSystem
{
    public partial class ShowReportSaleLoan : Form
    {
        private static DataTable dtReport;
        public ShowReportSaleLoan(DataTable dt)
        {
            InitializeComponent();
            dtReport = dt;
        }

        private void ShowReportSaleLoan_Load(object sender, EventArgs e)
        {
            ReportDocument rpt = new ReportDocument();
            rpt.Load("C:\\Users\\SARARAT\\Documents\\Visual Studio 2010\\Projects\\CarLoanSystem\\CarLoanSystem\\CarLoanSystem\\ReportSaleLoan.rpt");
            rpt.SetDataSource(dtReport);
            this.crystalReportViewer1.ReportSource = rpt;
            this.crystalReportViewer1.RefreshReport();
        }
    }
}